package priv.pront.code.robot.roboCom_uni;

import java.util.Scanner;

/**
 * @Description:
 * @Author: pront
 * @Time:2023-07-06 14:51
 */
public class P1055_ISBN号码 {
    static int num = 0;

    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        String s = scanner.next();
        String sss;
        sss = s.replaceAll("-", "");
        String[] ss = sss.split("");
        for (int i = 0; i < ss.length - 1; i++) {
            int cur = Integer.parseInt(ss[i]);
            num += cur * (i + 1);
        }
        String target = num % 11 + "" ;
        if(target.equals("10")){
            target = "X";
        }
        if (target.equals(sss.substring(sss.length() - 1))) {
            System.out.println("Right");
        }else{
            System.out.println(s.substring(0, s.length() - 1) + target);
        }

    }
}
